package com.ruoyi.system.domain;

import com.ruoyi.system.domain.idclazz.SysRoleDeptId;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 角色和部门关联 sys_role_dept
 *
 * @author ruoyi
 */
@Entity
@IdClass(SysRoleDeptId.class)
@Data
public class SysRoleDept {
	/** 角色ID */
	@Id
	private Long roleId;

	/** 部门ID */
	@Id
	private Long deptId;

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("roleId", getRoleId())
				.append("deptId", getDeptId())
				.toString();
	}
}

